const { getXpathStr } = require('./getXpathStr')

function pageClick(page) {
  return async (xpath) => {
    const btn = await page.waitForSelector(getXpathStr(xpath))
    await btn.click()
  }
}

module.exports = {
  pageClick
}